<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
    <title>注册页面</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="/forum/public/static/js/jquery1.8.3/jquery.min.js"></script>
    <link rel="alternate icon" type="image/png" href="/forum/public/static/assets/i/favicon.png">
    <link rel="stylesheet" href="/forum/public/static/assets/css/amazeui.min.css"/>
    <script>
        function register() {
            var user=$("#user").val();
            var pwd=$("#pwd").val();
            $.post("/forum/index.php/user/Register/register",{"user":user,"pwd":pwd},function (data) {
                if (data==="success"){
                    alert("注册成功！");
                    window.location.href='/forum/index.php';
                }else {
                    alert("注册失败！请检查！");
                }
            })
        }
    </script>
    <style>
        .header {
            text-align: center;
        }
        .header h1 {
            font-size: 200%;
            color: #333;
            margin-top: 30px;
        }
        .header p {
            font-size: 14px;
        }
    </style>
</head>
<body>
<div class="header">
    <div class="am-g">
        <h1>PHP测试论坛</h1>
    </div>
    <hr />
</div>
<div class="am-g">
    <div class="am-u-md-8 am-u-sm-centered">
        <form class="am-form">
            <fieldset class="am-form-set">
                <input type="text" placeholder="用户名：6-20位字母或者数字" id="user">
                <input type="password" placeholder="密码：6-20位字母或者数字" id="pwd">
                <input type="email" placeholder="邮箱">
            </fieldset>
            <button type="button" class="am-btn am-btn-primary am-btn-block" onclick="register()">注册个账号</button>
        </form>
    </div>
</div>
<!--
用户名：<input type="text" id="user">
<br><br>
密码：<input type="password" id="pwd">
<br><br>
<button onclick="register()">注册</button>
-->
</body>
</html>
